package cn.bdqn.exception;

import cn.bdqn.enums.JxcEnum;
import lombok.Getter;

/**
 *
 * @author 郑大仙丶
 * @date 2018-12-28 16:04
 */
@Getter
public class JxcException extends RuntimeException {

    private Integer code;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public JxcException(JxcEnum jxcEnum) {
        super(jxcEnum.getMsg());
        this.code = jxcEnum.getCode();
    }

    public JxcException( Integer code,String message) {
        super(message);
        this.code = code;
    }
}
